using UIFramwork;
using UnityEngine.UI;


[UIDetail("ExamplePage", "UI Page/ExamplePage")]
public class ExamplePage : UIBase
{
    public Button btn;

    public override void CreateUI()
    {
        base.CreateUI();

        btn = transform.GetComponentInChildren<Button>(true);
    }


    public override void ActiveUI()
    {
        base.ActiveUI();
        btn.onClick.AddListener(OnPageBlackOpened);
    }
    public override void DeActiveUI()
    {
        base.DeActiveUI();
        btn.onClick.RemoveListener(OnPageBlackOpened);
    }



    public void OnPageBlackOpened()
    {
        UIMgr.Close<ExamplePage>();
    }
}
